import {NgModule} from '@angular/core';
import {Routes, RouterModule} from '@angular/router';
import {TrainComponent} from "@train/train.component";
import {StudentListComponent} from "@train/remark/student-list/student-list.component";

import {RemarkDetailComponent} from "@train/remark/remark-detail/remark-detail.component";
import {PlanComponent} from "@train/plan/plan.component";
import {EditComponent} from "@train/plan/edit/edit.component";
import {EditTeachingInformationComponent} from "@train/plan/edit-teaching-information/edit-teaching-information.component";
import {EditClassSummaryComponent} from "@train/plan/edit-class-summary/edit-class-summary.component";
import {EditTeachingProcessComponent} from "@train/plan/edit-teaching-process/edit-teaching-process.component";
import {ClassListComponent} from "@train/remark/class-list/class-list.component";
import {LessonListComponent} from "@train/remark/lesson-list/lesson-list.component";
import {CountComponent} from "@train/count/count.component";
import {RollCallComponent} from "@train/roll-call/roll-call.component";
import {CourseComponent} from "@train/course/course.component";
import {TechingDetailComponent} from "@train/plan/teching-detail/teching-detail.component";
import {RemarkComponent} from "@train/remark/remark.component";
import {AuthGuardService} from "@shared/service/auth-guard/auth-guard.service";
import {TrainParentComponent} from "@train/parent/parent.component";
import {TrainScheduleComponent} from "@train/parent/schedule/schedule.component";
import {TrainChildDetailComponent} from "@train/parent/child-detail/child-detail.component";
import {ParentClassRemarkComponent} from "@train/parent/class-remark/class-remark.component";
import {ParentClassTeacherComponent} from "@train/parent/class-teacher/class-teacher.component";
import {ParentClassPlanComponent} from "@train/parent/class-plan/class-plan.component";
import {TrainChildGrowUpComponent} from "@train/parent/grow-up/grow-up.component";
import {TrainTacticalComponent} from "@train/tactical/tactical.component";
import {TrainTacticalTypeComponent} from "@train/tactical/tactical-type/tactical-type.component";
import {TrainTacticalDetailComponent} from "@train/tactical/tactical-detail/tactical-detail.component";
import {TrainGrowUpListComponent} from "@train/parent/grow-up-list/grow-up-list.component";
import {PlanDetailComponent} from "@train/plan/teching-detail/plan-detail/plan-detail.component";
import {ViewTestScoresComponent} from "@train/parent/view-test-scores/view-test-scores.component";
import {ScoreStandardComponent} from "@train/parent/score-standard/score-standard.component";
import {SingleTestScoresComponent} from "@train/parent/single-test-scores/single-test-scores.component";
import {HistoryScoresComponent} from "@train/parent/history-scores/history-scores.component";
import {ScoresDetailsComponent} from "@train/parent/scores-details/scores-details.component";
import {AbilityChangeComponent} from "@train/parent/ability-change/ability-change.component";
import {AbilityGrowRecordComponent} from "@train/parent/ability-grow-record/ability-grow-record.component";
import {TEACHER_ROUTING} from "@train/teacher";
import {AbilityValueExplainComponent} from "@train/parent/ability-value-explain/ability-value-explain.component";


const routes: Routes = [
    {
      path: '',
      component: TrainComponent,
      canActivateChild: [AuthGuardService],
      children: [
        {
          path: 'plan',
          children: [
            {// 班级列表
              path: 'teacher/classes',
              component: ClassListComponent
            },
            {
              path: 'class/:classId',
              component: PlanComponent,
            },
            {
              path: 'edit/:classId',
              component: EditComponent
            },
            {
              path: 'edit-info/:classScheduleId',
              component: EditTeachingInformationComponent
            },
            {
              path: 'edit-summary/:classScheduleId',
              component: EditClassSummaryComponent
            },
            {
              path: 'edit-process/:classScheduleId',
              component: EditTeachingProcessComponent
            },
            {
              path: 'lesson-detail/:classScheduleId',
              component: TechingDetailComponent
            }, {
              path: 'plan-detail/:classScheduleId',
              component: PlanDetailComponent
            }
          ]
        },
        {
          path: 'count',
          component: CountComponent
        },
        {
          path: 'roll-call',
          component: RollCallComponent
        },
        {
          path: 'course',
          component: CourseComponent
        },

        {
          path: 'remark',
          component: RemarkComponent,
          children: [
            {
              path: ':identityType/classes',
              component: ClassListComponent
            },
            {
              path: ':identityType/students',
              component: StudentListComponent
            },
            {
              path: ':identityType/lessons',
              component: LessonListComponent
            },
            {
              path: ':identityType/lesson',
              component: RemarkDetailComponent
            }
          ]
        },
        {
          path: 'parent',
          children: [
            {
              path: '',
              component: TrainParentComponent
            },
            {
              path: 'schedule/:studentId',
              component: TrainScheduleComponent
            },
            {
              path: 'student/:studentId',
              component: TrainChildDetailComponent
            },
            // {
            //   path: 'class-detail/:classId/:studentId',
            //   component: ClassDetailComponent
            // }
            {
              path: 'class-remark/:classId/:studentId',
              component: ParentClassRemarkComponent
            },
            {
              path: 'class-plan/:classId',
              component: ParentClassPlanComponent
            },
            {
              path: 'class-teacher/:classId',
              component: ParentClassTeacherComponent
            },
            // 身体数据详情
            {
              path: 'grow-up/:studentId/:categoryId',
              component: TrainChildGrowUpComponent
            },
            // 身体数据列表
            {
              path: 'grow-up-list/:studentId',
              component: TrainGrowUpListComponent
            },
            // 查看测试成绩
            {
              path: 'view-test-scores/:studentId/:testDate/:testModeId/:testMethodId',
              component: ViewTestScoresComponent
            },
            // 评分标准
            {
              path: 'score-standard/:itemId/:ageId',
              component: ScoreStandardComponent
            },
            // 单项测试成绩
            {
              path: 'single-test-scores/:studentId/:levelId/:testModeId/:testMethodId',
              component: SingleTestScoresComponent
            },
            // 历史成绩
            {
              path: 'history-scores/:studentId/:levelId/:testModeId/:testMethodId',
              component: HistoryScoresComponent
            },
            // 成绩详情
            {
              path: 'scores-details/:studentId/:levelId/:testModeId/:testMethodId',
              component: ScoresDetailsComponent
            },
            // 能力成长记录
            {
              path: 'ability-grow-record/:studentId',
              component: AbilityGrowRecordComponent
            },
            // 能力变化
            {
              path: 'ability-change/:studentId/:testModelId',
              component: AbilityChangeComponent
            },
            // 能力值解释
            {
              path: 'ability-value-explain',
              component: AbilityValueExplainComponent
            }
          ]
        },
        {
          path: 'tactical',
          children: [
            {
              path: '',
              component: TrainTacticalComponent
            },
            {
              path: ':type',
              component: TrainTacticalTypeComponent
            },
            {
              path: ':type/detail/:tacticId',
              component: TrainTacticalDetailComponent
            }
          ]
        },
        {
          path: 'teacher',
          children: TEACHER_ROUTING
        }
      ]
    }
  ]
;


@NgModule({
  imports: [RouterModule.forChild(routes)],
  exports: [RouterModule]
})
export class TrainRoutingModule {
}
